checkVersion();
        function checkVersion() {
            var agent = window.navigator.userAgent,
            start = agent.indexOf('OS ');
            if ((agent.indexOf('iPhone') > -1 || agent.indexOf('iPad') > -1) && start > -1) {
                var newSS = document.createElement('link');
                newSS.rel = 'stylesheet';
                newSS.media = 'only screen and (max-device-width: 1024px)';
                newSS.href = 'css/iPad.css';
                document.getElementsByTagName("head")[0].appendChild(newSS);
                var iPhoneSS = document.createElement('link');
                iPhoneSS.rel = 'stylesheet';
                iPhoneSS.media = 'only screen and (-webkit-min-device-pixel-ratio: 2)';
                iPhoneSS.href = 'css/iphone.css';
                document.getElementsByTagName("head")[0].appendChild(iPhoneSS);
            }
        }